<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>欢迎页面-小螺号</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="./css/font.css">
		<link rel="stylesheet" href="./css/xadmin.css">
		<script type="text/javascript" src="./js/jquery.min.js"></script>
		<script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="./js/xadmin.js"></script>
		<!--kindeditor-->
		<link rel="stylesheet" href="kindeditor/themes/default/default.css" />
		<link rel="stylesheet" href="kindeditor/plugins/code/prettify.css" />
		<script charset="utf-8" src="kindeditor/kindeditor-all.js"></script>
		<script charset="utf-8" src="kindeditor/lang/zh-CN.js"></script>
		<script charset="utf-8" src="kindeditor/plugins/code/prettify.js"></script>
		<!--<script type="text/javascript" src="js/common.js"></script>-->
		<link rel="stylesheet" type="text/css" href="./css/common.css">
		<link rel="stylesheet" type="text/css" href="./css/select.css">

		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	</head>
	<style>
		.mt20 {
			margin-top: 20px;
		}
		
		#photo1_show {
			width: 95px;
			height: 95px;
		}
		
		#photo2_show img {
			width: 150px;
			padding: 10px;
		}
	</style>
	<script>
		var editor;
		KindEditor.ready(function(K) {
			editor = K.create('textarea[name="content"]', {
				resizeType: 1,
				allowPreviewEmoticons: false,
				allowImageUpload: false,
				items: [
					'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
					'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
					'insertunorderedlist', '|', 'emoticons', 'image', 'link'
				]
			});
		});
	</script>

	<body>
		<div class="x-body">

			<form class="layui-form" action="">
				<div class="layui-tab">
					<ul class="layui-tab-title">
						<li class="layui-this">基本信息</li>
						<li>关联商品</li>
					</ul>
					<div class="layui-tab-content">
						<div class="layui-tab-item layui-show">
							<div class="layui-form-item" style=" display: none;">
								<label class="layui-form-label">ID</label>
								<div class="layui-input-inline">
									<input type="text" name="aid" class="layui-input" value="1">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">标题</label>
								<div class="layui-input-block">
									<input type="text" name="Title" lay-verify="required" class="layui-input" value="标题标题标题标题标题标题">
								</div>
							</div>

							<div class="layui-form-item">
								<label class="layui-form-label">文章分类</label>
								<div class="layui-input-inline">
									<select name="city" lay-verify="required">
										<option value=""></option>
										<option value="0">分类1</option>
										<option value="1">分类2</option>
										<option value="2">分类3</option>
										<option value="3">分类4</option>
										<option value="4">分类5</option>
									</select>
								</div>
							</div>

							<div class="layui-form-item">
								<label class="layui-form-label">上传封面</label>
								<div class="layui-input-block">
									<img class="layui-upload-img" id="photo1_show">
									<p id="demoText"></p>
									<button type="button" class="layui-btn mt20" id="photo1"><i class="layui-icon"></i>上传图片</button>
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">文章详情</label>
								<div class="layui-input-block">
									<textarea name="content" style="width:100%;height:350px;visibility:hidden;"></textarea>
								</div>

							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">发布时间</label>
								<div class="layui-input-inline">
									<input class="layui-input" lay-verify="required" placeholder="yyyy-MM-dd" name="date-time" id="datetime">
								</div>

							</div>

						</div>
						<div class="layui-tab-item">
							<div class="layui-form-item">
								<!--<div class="layui-form-item">
									<div class="layui-input-inline">
										<input type="tel" id="area_btn_y1" onclick="show_lay(1)" name="phone" lay-verify="phone" autocomplete="off" class="layui-input">
									</div>
								</div>-->
								<div class="fade_layer"></div>
								<div class="detail_layer select_peo">
									<div class="title">选择人员</div>
									<div class="select_peo_con">
										<div class="left">
											<div class="areas_list">
												<ul class="yiji">
													<li class="areas_list_one">
														<a>文章分类一</a>
													</li>
													<ul class="areas_list_two">
														<li><span id="1005">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="1006">文章标题文章标题文章标题文章标题文章标题2</span></li>
														<li><span id="1007">文章标题文章标题文章标题文章标题文章标题3</span></li>
														<li><span id="1008">文章标题文章标题文章标题文章标题文章标题4</span></li>
													</ul>
													<li class="areas_list_one">
														<a>文章分类二</a>
													</li>
													<ul class="areas_list_two">
														<li><span id="105">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="106">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="107">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="108">文章标题文章标题文章标题文章标题文章标题1</span></li>
													</ul>
													<li class="areas_list_one">
														<a>文章分类三</a>
													</li>
													<ul class="areas_list_two">
														<li><span id="109">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="110">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="111">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="112">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="113">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="114">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="115">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="116">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="117">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="118">文章标题文章标题文章标题文章标题文章标题1</span></li>
														<li><span id="119">文章标题文章标题文章标题文章标题文章标题1</span></li>
													</ul>
												</ul>
											</div>
										</div>
										<div class="center">
											<a id="list_add"><img src="images/addicon.jpg"></a>
										</div>
										<div class="right">
											<ul class="send_to">
											</ul>
										</div>
										<div class="clear"></div>
										<div class="bot_btn">
											<a onclick="do_add(this)" class="a_con do_add">确定</a>
											<a class="a_con close_btn">取消</a>
										</div>
									</div>
								</div>

							</div>

						</div>
						<div class="layui-tab-item">

							<div class="layui-form-item">

								<div class="layui-upload">
									<button type="button" class="layui-btn" id="photo2">上传图片</button>
									<blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
										预览图：
										<div class="layui-upload-list" id="photo2_show"></div>
									</blockquote>
								</div>
							</div>

						</div>

					</div>
				</div>

				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
		<script>
			layui.use(['form', 'layer', 'element', 'laydate'], function() {
				$ = layui.jquery;
				var form = layui.form,
					var laydate = layui.laydate,
						var element = layui.element,
							layer = layui.layer;

				//执行一个laydate实例
				laydate.render({
					elem: '#date-time' //指定元素
				});
				//监听提交
				form.on('submit(add)', function(data) {
					console.log(data);
					//发异步，把数据提交给php
					layer.alert("增加成功", {
						icon: 6
					}, function() {
						// 获得frame索引
						var index = parent.layer.getFrameIndex(window.name);
						//关闭当前frame
						parent.layer.close(index);
					});
					return false;
				});

			});
		</script>
		<script>
			layui.use('laydate', function() {
				var laydate = layui.laydate;

				//常规用法
				laydate.render({
					elem: '#datetime'
				});
			});
		</script>
		<script type="text/javascript" src="js/select.js"></script>

	</body>

</html>